|
Cytosim
PI
Cytoskeleton Simulator
|
The number of points is arbitrary, see http://mathworld.wolfram.com/SphericalCode.html
Algorithm:
The procedure (steps 2-4) is continues until convergence.
The main method is the class constructor, or equivalently distributePoints(), which take the number of points as argument and makes the calculation. Points coordinates can then be retrieved using either:
Public Member Functions | |
| PointsOnSphere () | |
| default constructor, does nothing | |
| PointsOnSphere (int nbp) | |
| constructor that also calls distributePoints(), | |
| virtual | ~PointsOnSphere () |
| default destructor | |
| unsigned int | nbPoints () |
| number of points in the configuration | |
| real | finalEnergy () |
| the 'virtual' total energy of the configuration | |
| real | minimumDistance () |
| minimum distance in the configuration, in 3D space | |
| void | scale (real factor) |
| multiply all coordinates by the given factor | |
| const real * | addr (const unsigned int ii) const |
| address where the coordinates for point ii are | |
| void | copyCoordinatesOfPoint (real x[3], unsigned int ii) |
| copy the coordinates from point ii onto the given 3-dim array x | |
| void | copyCoordinatesOfPoint (real *x, real *y, real *z, unsigned int ii) |
| copy the coordinates from point ii onto x,y,z | |
| void | copyPositionsForAllPoints (real x[]) |
| copy the array points coordinates onto the given array x | |
| void | printAllPositions (FILE *file=stdout) |
| write points coordinates | |
| int | distributePoints (unsigned int nbp, real precision=1e-4) |
| distribute the nbp points on the sphere and store their coordinates | |
Static Public Member Functions | |
| static real | expectedDistance (int) |
| expected distance between neighboring points More... | |
|
static |
With N points on the sphere according to a triagular lattice, each of ~2N triangles should occupy an area of S = 4*PI/2*N, and the distance between points should be ~2 * sqrt(S/sqrt(3)).